home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / UTILITY / JSEARCH.ARJ / JSEARCH.DOC next >
Text File  |  1992-02-02  |  4KB  |  128 lines

  1. *** A free string search program from Josh Greenberger ***
  2. *** This program may be freely distributed ***
  3.  
  4.  
  5.  
  6.  
  7. JSEARCH Documentation
  8. --------------------
  9. Assume you have the following files on disk:
  10.  
  11.  
  12. FILE1.TXT containing ... 
  13. ---------
  14. They fight like cats and dogs.  
  15. But the cat always wins.
  16. And the dog never wins.  
  17.  
  18.  
  19. FILE2.TXT containing ... 
  20. ---------
  21. Crawls like a caterpillar.  
  22. Slow as a snail. 
  23.  
  24.  
  25. FILE3.TXT containing ... 
  26. ---------
  27. It's a dog eat dog world. 
  28. But not if you're a big dog. 
  29.  
  30.  
  31. Input Files
  32. -----------
  33. JSEARCH requires that you create a file called JSEARCH.INP with a
  34. list of all the files you want to search through.  (You can do this
  35. with an editor or word processor.  Or, for long lists, you can
  36. create JSEARCH.INP with the DIR command with redirection.)  So,
  37. file JSEARCH.INP, in this case, will contain ... 
  38.  
  39. FILE1.TXT
  40. FILE2.TXT
  41. FILE3.TXT
  42.  
  43.  
  44. In the following example 'PROMPT>' indicates the program's prompt. 
  45. 'RESP>' indicates your response.  Anything in square brackets is
  46. explanation for documentation purposes.  <cr> means hit carriage
  47. return.  
  48.  
  49.  
  50. After creating input file JSEARCH.INP, start the search by entering
  51. ... 
  52.  
  53. JSEARCH<cr>
  54.  
  55. PROMPT>Search for EXACT matches? (E)  Or ignore case? (<cr>) ...
  56.  
  57. [You may enter an 'E' if you want a case-sensitive search, or
  58. carriage return if you want the case ignored.  For now, we just hit
  59. <cr>.]
  60.  
  61. PROMPT>Enter search string   1 (80 character max / <cr> to end) ...
  62. RESP>cat
  63. PROMPT>   ... Is the above string a WORD? (W)
  64.               Or an embedded string?      (<cr>) ... RESP>w
  65.  
  66. [If you want 'cat' found only if it's a separate word, enter 'W'. 
  67. If you don't care if it's part of another word, hit <cr>.]
  68.  
  69. PROMPT>Enter search string   2 (80 character max / <cr> to end) ...
  70. RESP>dog
  71. PROMPT>   ... Is the above string a WORD? (W)
  72.               Or an embedded string?      (<cr>) ...  RESP> <cr>
  73.  
  74.  
  75. PROMPT>Enter search string   3 (80 character max / <cr> to end) ...
  76.  
  77. [As long as you keep entering search strings you will continue to
  78. be prompted for more, up to 100 times.  Hitting <cr> without
  79. entering a string will move you on to the next step.  In this case,
  80. we hit <cr>.]
  81.  
  82.  
  83. PROMPT>AND search strings? (A)   Or OR search strings? (<cr>) ...
  84.                                                        RESP> <cr>
  85.  
  86. [If you want to find only lines that contain all your search
  87. strings on the same line, enter 'A'.  If you want to find any line
  88. that contains any one of your search strings, enter <cr>.]
  89.  
  90. PROMPT>Do not search lines beginning with ... RESP>but <cr>
  91.  
  92. [The search will not be performed on lines that begin with the
  93. string entered here.  <cr> without a string will cause all lines to
  94. be searched.  In this case, we don't want to search lines beginning
  95. with 'but'.] 
  96.  
  97.  
  98. The search begins, and you will see the following on the screen:
  99.  
  100. --- FILE: FILE1.TXT
  101. --- FILE: FILE2.TXT
  102. --- FILE: FILE3.TXT
  103. - EOJ -
  104.  
  105.  
  106.  
  107. The results of the search are contained in a file called
  108. JSEARCH.OUT.  For this example, JSEARCH.OUT will look like this:
  109.  
  110.  * String search, ignoring case.
  111.  * Ignored lines beginning with ... 
  112.  ->BUT<-
  113.  
  114.      The following strings have been ORed :
  115.      --------------------------------------
  116.  W ->CAT<-
  117.    ->DOG<-
  118.      --------------------------------------
  119.  
  120.  --- FILE: FILE1.TXT   
  121.     1>They fight like cats and dogs.
  122.     3>And the dog never wins.
  123.  --- FILE: FILE2.TXT   
  124.  --- FILE: FILE3.TXT   
  125.     1>It's a dog eat dog world.
  126.  - EOJ -
  127.  
  128.